package com.aierjun.notepad;

import android.app.ActionBar;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.widget.ImageView;
import android.widget.PopupWindow;
import android.widget.TextView;

public class AddActivity extends Activity {

    private ImageView mButton;
    private PopupWindow mPopupWindow;
    private TextView tx1,tx2,tx3;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_history_notepad);

        View popupView = getLayoutInflater().inflate(R.layout.add_activity, null);

        mPopupWindow = new PopupWindow(popupView, ActionBar.LayoutParams.MATCH_PARENT, ActionBar.LayoutParams.WRAP_CONTENT, true);
        mPopupWindow.setTouchable(true);
        mPopupWindow.setOutsideTouchable(true);
        mPopupWindow.setBackgroundDrawable(new BitmapDrawable(getResources(), (Bitmap) null));

        mButton = (ImageView) findViewById(R.id.add_xinjian);
        mButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mPopupWindow.showAtLocation(findViewById(R.id.add_xinjian),Gravity.CENTER,200,0);

                /*switch (v.getId()){
                    case R.id.xinjian:
                        startActivity(new Intent(AddActivity.this,NewListActivity.class));
                        break;
                    case R.id.shezhi:
                        startActivity(new Intent(AddActivity.this,SettingActivity.class));
                        break;
                    case R.id.quxiao:
                        finish();
                }*/
            }
        });
    }
}

